package com.test.project_test.test.domain;

import java.io.Serializable;
import java.util.List;

/**
 * @author Duan SanMao
 * @date 2021/9/1
 */

public class PageDTO<T> implements Serializable {


    private static final long serialVersionUID = 8545996863226528798L;
    protected List<T> list;
    protected long total;
    protected long pages;
    protected long pageNum = 1L;
    protected long pageSize = 10L;


    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getPages() {
        return pages;
    }

    public void setPages(long pages) {
        this.pages = pages;
    }

    public long getPageNum() {
        return pageNum;
    }

    public void setPageNum(long pageNum) {
        this.pageNum = pageNum;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    @Override
    public String toString() {
        return "PageDTO{" +
                "list=" + list +
                ", total=" + total +
                ", pages=" + pages +
                ", pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                '}';
    }

    public PageDTO(List<T> list, long total, long pages, long pageNum, long pageSize) {
        this.list = list;
        this.total = total;
        this.pages = pages;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }

    public PageDTO(List<T> list, long total) {
        this.list = list;
        this.total = total;
    }
}
